package com.lemlin.network

interface HttpServiceStatus {

    enum class Status {
        START,SUCCESS,FAILURE
    }

    var statusCode: Status

    var throwable: Throwable?

//    val statusTip: String
//        get() = when (statusCode) {
//            Status.START -> "开始请求"
//            Status.SUCCESS -> "请求成功"
//            Status.FAILURE -> throwable?.message ?: "未知错误"
//        }

    val statusTip: String
        get() = when (statusCode) {
            Status.START -> "开始请求"
            Status.SUCCESS -> "请求成功"
            Status.FAILURE -> throwable?.message ?: "未知错误"
        }
}